package com.zy.service.sys.Impl;

import com.zy.crud.service.Impl.BaseServiceImpl;
import com.zy.mapper.sys.ZyRoleMapper;
import com.zy.model.sys.ZyRole;
import com.zy.model.sys.ZyRoleExample;
import com.zy.model.sys.ZyUser;
import com.zy.service.sys.ZyRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(readOnly = false, rollbackFor = Exception.class)
public class ZyRoleServiceImpl extends BaseServiceImpl<ZyRoleMapper, ZyRole, ZyRoleExample> implements ZyRoleService {

    @Resource
    private ZyRoleMapper roleMapper;

    public List<ZyRole> getRoleByUser(ZyUser user){
        List<ZyRole> roleList= roleMapper.selectRoleByUser(user);
        return  roleList;
    }

}

